﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="CitizenView.aspx.cs" Inherits="WebForms.Doctor.CitizenView" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Citizen Data</h2>
    <br />
    <h4>
        New data on the following citizens</h4>
    <%--En liste med de borgere hvorfra der er kommet nye data--%>

    <asp:DataList runat="server" ID="dlCitizens">
        <ItemTemplate>
            <h3><%# Eval("Name") %></h3>
            
            <asp:Repeater runat="server" DataSource='<%# GetList(Eval("CitizenId").ToString()) %>'>
                <ItemTemplate>
                    <p>
                        <a href='/Doctor/CitizenDetailedView.aspx?path=<%# Eval("Url") %>'>
                            <%# Eval("Name") %>
                        </a>
                    </p>
                </ItemTemplate>
            </asp:Repeater>
        </ItemTemplate>
    </asp:DataList> 

    <asp:GridView ID="gvCitizens" runat="server" AutoGenerateColumns="False">
        <Columns>
            <asp:HyperLinkField DataNavigateUrlFields="CitizenId" 
                DataNavigateUrlFormatString="/Doctor/CitizenDetailedView.aspx?citizenId={0}"
                DataTextField="Name" HeaderText="Name" />
            <asp:BoundField DataField="" HeaderText="Open date" />
            <asp:BoundField DataField="" HeaderText="Expiry date" />
        </Columns>
    </asp:GridView>
    </asp:Content>
